home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15643 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: Sun, 07 Apr 96 19:05:18 GMT
  6. Organization: none
  7. Message-ID: <828903918snz@genesis.demon.co.uk>
  8. References: <JSA.96Feb16135027@organon.com>   <emery-0204960656230001@line030.nwm.mindlink.net>   <828632277snz@genesis.demon.co.uk> <dewar.828704810@schonberg> <4k3utg$ndp@solutions.solon.com> <dewar.828757752@schonberg> <danpop.828819479@rscernix> <dewar.828879781@schonberg>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <dewar.828879781@schonberg> dewar@cs.nyu.edu "Robert Dewar" writes:
  15.  
  16. >Dan Pop
  17. >
  18. >"This is plain nonsense.  read in Linux (or anywhere else) CANNOT be ANSI
  19. >compliant for the simple reason that the ANSI/ISO C standard does NOT
  20. >define such a function.  read may (or may not) be POSIX, SVID or XPG
  21. >"
  22. >
  23. >Dan, you miss the point, of course read in Linux is compliant with the
  24. >ANSI standard, precisely because this standard does NOT specify any
  25. >required behavior for read, and permits the addition of such functions.
  26.  
  27. If that was the point, it is about the most pointless one I've seen! :-)
  28.  
  29. >How could you possibly claim that read could be non-compliant with ANSI
  30. >(something is either compliant or non-compliant, we do not have three
  31. >valued logic here).
  32.  
  33. You do have a point there. However ANSI does have a few things to say about
  34. the identifier read. It is not reserved which means I can define my own
  35. external linkage function called read in a strictly conforming C program.
  36. If this doesn't work correctly on a POSIX system then it isn't ANSI
  37. conforming. So particular implementations of read() may not be ANSI
  38. conforming. Also if, say, fread() went and called my read() instead of the
  39. system one that would also fail to be conforming. Implementations generally
  40. need to pull a few tricks to make sure this all works correctly.
  41.  
  42. -- 
  43. -----------------------------------------
  44. Lawrence Kirby | fred@genesis.demon.co.uk
  45. Wilts, England | 70734.126@compuserve.com
  46. -----------------------------------------
  47.